import java.util.Random;

public class String_09 {
    //生成五位数验证码
    public static void main(String[] args) {
        String datas="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";

        String code="";
        Random r=new Random();

        for (int i = 0; i <5; i++) {
            int index = r.nextInt(datas.length());
            char c=datas.charAt(index);
            code=code+c;
        }
        System.out.println(code);
    }
}
